<?php
namespace Home\Model;
use Think\Model;
class UserModel extends Model 
{

	public $tableName = 'user';

	/*获取入驻商家*/
	public function getUser($id)
	{
		$user['user_Id'] = $id['user_id'];
		$userModel     = M($this->tableName);
		$user_res      = $userModel->where($user)->select();
		//var_dump($user_res);exit();
		return $user_res;
	}

	/*更改店铺信息*/
	public function changed($arr)
	{
		$userModel    	 = M($this->tableName);
		$user['user_Id'] = $arr['user_id'];
		//var_dump($user);exit();
		$saveUser = $userModel->data($arr)->where($user)->save();
		return $saveUser;

	}

	/*删除会员*/
	public function del($id)
	{
		$user['user_Id'] = $id['user_id'];
		$userModel     = M($this->tableName);
		$user_res      = $userModel->where($user)->delete();
		//var_dump($user);exit();
		return $user_res;
	}

}